update appveyor build.
authortsteven4 <tsteven4@gmail.com>
Sun, 26 Nov 2017 22:51:31 +0000 (15:51 -0700)
committertsteven4 <tsteven4@gmail.com>
Sun, 26 Nov 2017 22:51:31 +0000 (15:51 -0700)
run basic tests.
build windows installer.
archive installer.

appveyor.yml
gui/setup.iss
gui/setup.iss.in

index fc11c96fa4249a7012833e198beaa471f3e0b0e8..a3f5bcc1d59e065304c4e6ccb008547fc8c92e15 100644 (file)
@@ -5,19 +5,94 @@ environment:
   # MinGW
   - name: win32
     platform: mingw
-    qt: 5.9\mingw53_32
+    qt: 5.5\mingw492_32
+    tools: mingw492_32
+  # MinGW
+  - name: win32
+    platform: mingw
+    qt: 5.6\mingw49_32
+    tools: mingw492_32
+  # MinGW
+  #  - name: win32
+  #    platform: mingw
+  #    qt: 5.9\mingw53_32
+  #    tools: mingw530_32
+  # MSVC x32
+  - name: win32
+    platform: x86
+    qt: 5.6\msvc2015
   # MSVC x64
   - name: win64
     platform: amd64
-    qt: 5.9\msvc2015_64
+    qt: 5.6\msvc2015_64
 
 init:
   - if %platform%==mingw set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
-  - if %platform%==mingw set PATH=C:\Qt\Tools\mingw530_32\bin;%PATH%
+  - if %platform%==mingw set PATH=C:\Qt\Tools\%tools%\bin;%PATH%
   - set PATH=C:\Qt\%qt%\bin;%PATH%
   - if not %platform%==mingw call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %platform%
 
 # Flesh out with amd64/msvc cases later.
 build_script:
-  - qmake GPSBabel.pro
-  - if not %platform%==mingw (nmake) else (mingw32-make)
+  - ps: |
+      if (($env:platform -eq "mingw") -and ($env:qt -eq "5.5\mingw492_32"))
+      {
+        Get-Location
+        qmake -query
+        # mimic creator shadow build to match Inno setup file
+        New-Item ..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release -type directory -force
+        cd ..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release
+        qmake ..\gpsbabel\GPSBabel.pro -spec win32-g++
+        mingw32-make qmake_all
+        mingw32-make
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
+        # copy GPSBabel.exe for use by test_script
+        New-Item ..\gpsbabel\release -type directory -force
+        Copy-Item release\GPSBabel.exe ..\gpsbabel\release\GPSBabel.exe
+        cd ..\gpsbabel
+        New-Item build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release -type directory -force
+        cd build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release
+        qmake ..\gui\app.pro -spec win32-g++
+        mingw32-make qmake_all
+        mingw32-make
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
+        lupdate ..\gui\app.pro
+        lrelease ..\gui\app.pro
+        # windeployqt in 5.5.1 suffers from bug
+        # https://bugreports.qt.io/browser/QTBUG-48946
+        # which trashes the translations.  Work around
+        # by using the next version of windeployqt which had this
+        # bug fixed.
+        # use --plugindir option to locate the plugins.
+        C:\Qt\5.6\mingw49_32\bin\windeployqt.exe --verbose 10 --plugindir release\plugins release\GPSBabelFE.exe
+        & 'C:\Program Files (x86)\Inno Setup 5\ISCC.exe' ..\gui\setup.iss
+        cd ..
+        $sha=(git rev-parse --short HEAD)
+        Get-ChildItem .\gui\release\*.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabelTest-$($env:APPVEYOR_BUILD_VERSION)-$($sha).exe" }
+      }
+      elseif ($env:platform -eq "mingw")
+      {
+        qmake GPSBabel.pro
+        mingw32-make
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
+      }
+      else
+      {
+        qmake GPSBabel.pro
+        nmake
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
+      }
+      # work around issue with standard error output causing a build failure by making sure last command succeeds.
+      # see https://help.appveyor.com/discussions/problems/10014-false-build-fail-status
+      Write-Host "Finished build_script"
+
+test_script:
+  - ps: |
+      $env:projdir=(C:\msys64\usr\bin\bash.exe -c "pwd")
+      C:\msys64\usr\bin\bash.exe -lc "echo $env:projdir"
+      # work around issue with standard error output from xmllint causing a build failure by redirecting stderr.
+      # in this case making sure the last command succeeds is not sufficient.
+      # see https://help.appveyor.com/discussions/problems/10014-false-build-fail-status
+      C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; PNAME=./release/GPSBabel.exe GBTEMP=./gbtemp ./testo 2>&1"
+      Write-Host "Finished test_script with exit status $LastExitCode"
+      if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
index b60c3b00d4a81460fdf1ae537e39b29d7664bd54..c5734a05b0d6228be5222c1b221110e9926be0aa 100644 (file)
@@ -6,7 +6,7 @@
 ; Script for generating installation setup program for GPSBabel\r
 ; Uses the Inno setup compiler.  Typically used from the command\r
 ; line "makesetup.bat" which copies QT system files which\r
-; the Innosetup compiler cannot handle.  \r
+; the Innosetup compiler cannot handle.\r
 ;\r
 ; So it is not a good idea to run this file from the Inno Setup GUI.\r
 \r
@@ -39,27 +39,27 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
 [Files]\r
 ; This isn't as wreckless as it seems; these directories are populated on a\r
 ; controlled way by the batch file.\r
-Source: qtdir\bin\*.dll;               DestDir: "{app}"; Flags: ignoreversion\r
-Source: qtdir\plugins\*;               DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+;Source: qtdir\bin\*.dll;              DestDir: "{app}"; Flags: ignoreversion\r
+;Source: qtdir\plugins\*;              DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs\r
 \r
 Source: gmapbase.html;                         DestDir: "{app}"; Flags: ignoreversion\r
 Source: qt.conf;                               DestDir: "{app}"; Flags: ignoreversion\r
 \r
-Source: ..\build-app-Desktop_Qt_5_2_1_Mingw_32bit-Release\release\gpsbabelfe.exe;      DestDir: "{app}"; Flags: ignoreversion\r
-Source: ..\..\build-GPSBabel-Desktop_Qt_5_2_1_Mingw_32bit-Release\release\gpsbabel.exe;        DestDir: "{app}"; Flags: ignoreversion\r
+Source: ..\build-app-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\*; Excludes: "*.cpp,*.o"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+Source: ..\..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\gpsbabel.exe;        DestDir: "{app}"; Flags: ignoreversion\r
 ; Source: release\help\*;              DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs\r
 \r
 ; Translation strings extracted from source code.  Include it in the dist\r
-; so that users can translate if they want to. \r
-; Source: gpsbabel_*.ts;               DestDir: "{app}\translations"; Flags: ignoreversion \r
-; Source: gpsbabelfe_*.ts;             DestDir: "{app}\translations"; Flags: ignoreversion \r
+; so that users can translate if they want to.\r
+; Source: gpsbabel_*.ts;               DestDir: "{app}\translations"; Flags: ignoreversion\r
+; Source: gpsbabelfe_*.ts;             DestDir: "{app}\translations"; Flags: ignoreversion\r
 \r
 ; Compiled translation strings that are used at runtime.\r
-; Source: gpsbabel_*.qm;               DestDir: "{app}\translations"; Flags: ignoreversion \r
-Source: gpsbabelfe*.qm;                DestDir: "{app}\translations"; Flags: ignoreversion \r
+; Source: gpsbabel_*.qm;               DestDir: "{app}\translations"; Flags: ignoreversion\r
+Source: gpsbabelfe*.qm;                DestDir: "{app}\translations"; Flags: ignoreversion\r
 \r
 ; Now translations from Qt's own UI stuff.\r
-Source: qtdir\translations\*;                  DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+;Source: qtdir\translations\*;                 DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs\r
 \r
 ; Miscellaneous\r
 Source: COPYING.txt;                   DestDir: {app}; Flags: ignoreversion\r
index 3ef0a73408bacbf08d425ea4e22ddf43e7086792..2c14bb8f1601941efaaefa48dbe9d24d70a9f0b8 100755 (executable)
@@ -6,7 +6,7 @@
 ; Script for generating installation setup program for GPSBabel\r
 ; Uses the Inno setup compiler.  Typically used from the command\r
 ; line "makesetup.bat" which copies QT system files which\r
-; the Innosetup compiler cannot handle.  \r
+; the Innosetup compiler cannot handle.\r
 ;\r
 ; So it is not a good idea to run this file from the Inno Setup GUI.\r
 \r
@@ -39,27 +39,27 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
 [Files]\r
 ; This isn't as wreckless as it seems; these directories are populated on a\r
 ; controlled way by the batch file.\r
-Source: qtdir\bin\*.dll;               DestDir: "{app}"; Flags: ignoreversion\r
-Source: qtdir\plugins\*;               DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+;Source: qtdir\bin\*.dll;              DestDir: "{app}"; Flags: ignoreversion\r
+;Source: qtdir\plugins\*;              DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs\r
 \r
 Source: gmapbase.html;                         DestDir: "{app}"; Flags: ignoreversion\r
 Source: qt.conf;                               DestDir: "{app}"; Flags: ignoreversion\r
 \r
-Source: ..\build-app-Desktop_Qt_5_2_1_Mingw_32bit-Release\release\gpsbabelfe.exe;      DestDir: "{app}"; Flags: ignoreversion\r
-Source: ..\..\build-GPSBabel-Desktop_Qt_5_2_1_Mingw_32bit-Release\release\gpsbabel.exe;        DestDir: "{app}"; Flags: ignoreversion\r
+Source: ..\build-app-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\*; Excludes: "*.cpp,*.o"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+Source: ..\..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\gpsbabel.exe;        DestDir: "{app}"; Flags: ignoreversion\r
 ; Source: release\help\*;              DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs\r
 \r
 ; Translation strings extracted from source code.  Include it in the dist\r
-; so that users can translate if they want to. \r
-; Source: gpsbabel_*.ts;               DestDir: "{app}\translations"; Flags: ignoreversion \r
-; Source: gpsbabelfe_*.ts;             DestDir: "{app}\translations"; Flags: ignoreversion \r
+; so that users can translate if they want to.\r
+; Source: gpsbabel_*.ts;               DestDir: "{app}\translations"; Flags: ignoreversion\r
+; Source: gpsbabelfe_*.ts;             DestDir: "{app}\translations"; Flags: ignoreversion\r
 \r
 ; Compiled translation strings that are used at runtime.\r
-; Source: gpsbabel_*.qm;               DestDir: "{app}\translations"; Flags: ignoreversion \r
-Source: gpsbabelfe*.qm;                DestDir: "{app}\translations"; Flags: ignoreversion \r
+; Source: gpsbabel_*.qm;               DestDir: "{app}\translations"; Flags: ignoreversion\r
+Source: gpsbabelfe*.qm;                DestDir: "{app}\translations"; Flags: ignoreversion\r
 \r
 ; Now translations from Qt's own UI stuff.\r
-Source: qtdir\translations\*;                  DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+;Source: qtdir\translations\*;                 DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs\r
 \r
 ; Miscellaneous\r
 Source: COPYING.txt;                   DestDir: {app}; Flags: ignoreversion\r